//
//  JHStatus.swift
//  JHSinaWeibo
//
//  Created by apple on 16/6/1.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

class JHStatus: NSObject {
    //自动匹配机型的品台
    var id:Int64 = 0
    //微博创建时间
    var created_at:String?
    //微博来源
    var source : String?
    //微博信息内容
    var text:String?
    //用户 直接赋值 会给自定义对象赋值一个字典
    var user:JHUser?
    //kvc
    init(dict :[String:AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    override func setValue(value: AnyObject?, forKey key: String) {
        if key == "user" {
            if let dict = value as? [String:AnyObject]  {
                user = JHUser(dict: dict)
            }
            return
        }
        super.setValue(value, forKey: key)
    }
    //过滤
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
    
    }
}
